| Conditions | 4 |
| Paths | 4 |
| Total Lines | 37 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import debug from 'debug' |
||
| 21 | var p = new Promise((resolve, reject) => { |
||
|
|
|||
| 22 | |||
| 23 | log = debug(processName + ':log') |
||
| 24 | log.color = 2 |
||
| 25 | trace = debug(processName + ':trace') |
||
| 26 | error = debug(processName + ':error') |
||
| 27 | error.color = 1 |
||
| 28 | |||
| 29 | processConfig = {} |
||
| 30 | Array.prototype.forEach.call(process.argv, (item) => { |
||
| 31 | if (item.indexOf('=') > -1) { |
||
| 32 | var ar = item.split('=') |
||
| 33 | processConfig[ar[0]] = ar[1] |
||
| 34 | } |
||
| 35 | }) |
||
| 36 | if(processConfig.ABE_WEBSITE) { |
||
| 37 | config.set({root: processConfig.ABE_WEBSITE.replace(/\/$/, '') + '/'}) |
||
| 38 | } |
||
| 39 | |||
| 40 | processConfig = extend(true, conf, processConfig) |
||
| 41 | |||
| 42 | if(typeof processConfig.ABE_WEBSITE !== 'undefined' && processConfig.ABE_WEBSITE !== null) { |
||
| 43 | abeExtend.hooks.instance.trigger('afterHandlebarsHelpers', Handlebars) |
||
| 44 | |||
| 45 | Manager.instance.init() |
||
| 46 | .then(()=> { |
||
| 47 | dateStart = moment() |
||
| 48 | resolve() |
||
| 49 | }) |
||
| 50 | .catch((e) => { |
||
| 51 | error('publish-all' + e) |
||
| 52 | }) |
||
| 53 | }else { |
||
| 54 | error('ABE_WEBSITE is not defined use node process.js ABE_WEBSITE=/pat/to/website') |
||
| 55 | process.exit(0) |
||
| 56 | } |
||
| 57 | }) |
||
| 58 | |||
| 60 | } |
This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.